package com.ag.lwc.service;

import java.util.List;

import com.ag.bean.TbUrealGroup;
import com.ag.lwc.dao.ContactGroupDAO;

/**
 * 虚拟组
 * @author user
 *
 */
public class ContactGroupService {
	private ContactGroupDAO contactgroupdao;
	
	/**
	 * 查找某个用户的虚拟组
	 * @param userId
	 * @return
	 */
	public List<TbUrealGroup> findAll(String userId)
	{
		List<TbUrealGroup> list = null;
		list = contactgroupdao.findAll(userId);
		return list;
	}
	/**
	 * 根据虚拟组的id查询虚拟组
	 * @param groupId
	 * @return
	 */
	public TbUrealGroup findOneGroup(int groupId)
	{
		TbUrealGroup group = null;
		group = contactgroupdao.findOneGroup(groupId);
		return group;
	}
	/**
	 * 修改虚拟组
	 * @param group
	 */
	public void updateGroup(TbUrealGroup group)
	{
		contactgroupdao.updateGroup(group);
	}
	
	
	/**
	 * 根据id删除虚拟组
	 * @param groupId
	 */
	public void deleteGroup(int groupId)
	{
		contactgroupdao.deleteGroup(groupId);
	}

	/**
	 * 增加虚拟组
	 * @param group
	 */
	public void addGroup(TbUrealGroup group)
	{
		contactgroupdao.addGroup(group);
	}
	public ContactGroupDAO getContactgroupdao() {
		return contactgroupdao;
	}
	public void setContactgroupdao(ContactGroupDAO contactgroupdao) {
		this.contactgroupdao = contactgroupdao;
	}
	
}
